package main

import (
	"chapter3/src/config"
	"fmt"
)

/**
 * Created with Goland.
 * User: 令狐飞侠
 * Date: 2021-12-4
 * Description: spf13/viper 驱动函数
 */
func main() {
	config.Init()

	fmt.Println("server的配置参数:")
	serverPort:= config.GetValue("server.port")
	fmt.Println("server port::",serverPort)

	fmt.Println("MySql的配置参数:")
	host:= config.GetValue("mysql.host")
	fmt.Println("mysql  host:",host)
	port:= config.GetValue("mysql.port")
	fmt.Println("mysql  port:",port)
	user:= config.GetValue("mysql.user")
	fmt.Println("mysql  user:",user)
	password:= config.GetValue("mysql.password")
	fmt.Println("mysql  password:",password)
}
